#ifndef ONLINEMUSICWIDGET_H
#define ONLINEMUSICWIDGET_H

#include <QWidget>
#include <QUrl>
#include <QAudioOutput>
#include <QMediaPlayer>
QT_BEGIN_NAMESPACE
namespace Ui {
class OnlineMusicWidget;
}
QT_END_NAMESPACE

class OnlineMusicWidget : public QWidget
{
    Q_OBJECT

public:
    OnlineMusicWidget(QWidget *parent = nullptr);
    ~OnlineMusicWidget();
    void paintEvent(QPaintEvent *ev);//设置背景

private slots:
    void on_pushButton_3_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_7_clicked();

    void on_pushButton_6_clicked();

    void on_pushButton_8_clicked();

    void on_listWidget_doubleClicked(const QModelIndex &index);

    void on_pushButton_9_clicked();

    void on_verticalSlider_valueChanged(int value);

private:
    Ui::OnlineMusicWidget *ui;
    QList<QUrl> playList; //播放列表
    QAudioOutput* audioOutput;
    QMediaPlayer* mediaPlayer;
    int curPlayIndex=0;
    bool kj=false;
    int savedVolumeValue=50;
};
#endif // ONLINEMUSICWIDGET_H
